import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:whale/helper/utils/color.dart';

import '../../../../helper/route/routes.dart';
import '../../../app_tab/controller.dart';
import '../logic.dart';

class HomeSearchItemWidget extends StatelessWidget {
  HomeSearchItemWidget({Key? key}) : super(key: key);
  final tabState = Get.find<AppTabController>().state;
  final logic = Get.find<HomeLogic>();
  @override
  Widget build(BuildContext context) {
    return Hero(
        tag: 'search',
        child: Container(
          key: tabState.intro.keys[1],
          padding: EdgeInsets.fromLTRB(15.r, 20.r, 15.r, 0),
          child: InkWell(
            onTap: () {
              Get.toNamed(RouterPath.search, arguments: '请输入关键字', parameters: {
                'reportType': '政策措施',
              });
            },
            child: Container(
              height: 44.r,
              alignment: Alignment.centerLeft,
              padding: EdgeInsets.symmetric(horizontal: 10.r),
              decoration: BoxDecoration(
                borderRadius: BorderRadius.circular(5.r),
                color: Colors.white,
              ),
              child: Text(
                '请输入关键字',
                style: TextStyle(
                  color: Color(0xffAAAAAA),
                  fontSize: 14.sp,
                ),
              ),
            ),
          ),
        ));
  }
}
